
function createdNode(str) {
  const nodestate ={
    "position": {
      "x": "50",
      "y": "170"
    },
    "size": {
      "width": 130,
      "height": 30
    },
    "view": "vue-shape-view",
    "attrs": {
      "body": {
        "fill": "#3A3D51",
        "stroke": "#3A3D51",
        "strokeWidth": 1,
        "rx": 6,
        "ry": 6
      },
      "label": {
        "text": "",
        "fill": "white"
      }
    },
    "shape": "nodeshape",
    "id": "1",
    "data": {
      "num": 1,
      "nodestatus": "start",
      "nodetype":""
    },
    "ports": {
      "groups": {
        "bottom": {
          "position": "bottom",
          "attrs": {
            "circle": {
              "r": 3,
              "magnet": true,
              "stroke": "#31d0c6",
              "strokeWidth": 2,
              "fill": "#fff"
            }
          }
        },
        "top": {
          "position": "top",
          "attrs": {
            "circle": {
              "r": 3,
              "magnet": true,
              "stroke": "#31d0c6",
              "strokeWidth": 2,
              "fill": "#fff"
            }
          }
        },
        "left": {
          "position": "left",
          "attrs": {
            "circle": {
              "r": 3,
              "magnet": true,
              "stroke": "#31d0c6",
              "strokeWidth": 2,
              "fill": "#fff"
            }
          }
        },
        "right": {
          "position": "right",
          "attrs": {
            "circle": {
              "r": 3,
              "magnet": true,
              "stroke": "#31d0c6",
              "strokeWidth": 2,
              "fill": "#fff"
            }
          }
        }
      },
      "items": [
        {
          "group": "bottom",
          "args": {
            "dx": 2
          },
        },
        {
          "group": "top",
          "args": {
            "dx": 2
          }
        },
        {
          "group": "left",
          "args": {
            "dx": 2
          },
        },
        {
          "group": "right",
          "args": {
            "dx": 2
          },
        }
      ]
    },
    "zIndex": 1
  }
  return  nodestate
}
function createdEdge(){
  const Edgestate=
    {
      "shape": "edge",
      "attrs": {
        "line": {
          "stroke": "#A2B1C3",
          "strokeWidth": 1
        },
      },
      defaultLabel: {
        markup: [
          {
            tagName: 'rect',
            selector: 'body',
          },
          {
            tagName: 'text',
            selector: 'label',
          },
        ],
        attrs: {
          text: {
            fill: '#A2B1C3',
            fontSize: 14,
            textAnchor: 'middle',
            textVerticalAnchor: 'middle',
            pointerEvents: 'none',
          },
          rect: {
            ref: 'label',
            fill: '#1c1b1b',
            rx: 1,
            ry: 1,
            refWidth: 1,
            refHeight: 1,
            refX: 0,
            refY: 0,
          },
        },
        position: {
          distance: 0.5,
        },
      },

      "router": {
        "args": {
          "offset": "center"
        }
      },
      "source": {
        "cell": "",
        "port": ""
      },
      "target": {
        "cell": "",
        "port": ""
      },
      "zIndex": 2
    }
    return Edgestate
}

export default {
  createdNode,
  createdEdge
}